<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .xx {
      background-color: #fff;
      width: 999px;
    }
  </style>
</head>
<body>
  <div id="app">
    {{ message }}
  </div>
  <script src="./libs/vue.js"></script>
  <script>
    const vm = new Vue({
      el: '#app',
      data: {
        message: 'hello'
      },
      // 生命周期钩子函数
      beforeCreate() {
        console.log('before create', this.message)
      },
      created() {
        console.log('created...', this.message)
      },
      beforeMount() {
        console.log('before mount', this.$el)
      },
      mounted() {
        console.log('mounted...', this.$el)
      },
      beforeUpdate() {
        console.log('before update')
      },
      updated() {
        console.log('updated...')
      },
      beforeDestroy() {
        console.log('before destroy')
      },
      destroyed() {
        console.log('destroyed...')
      },
    })
  </script>
</body>
</html>